import request from '@/utils/request'

// 查询商品列表列表
export function listShangpin(query) {
  return request({
    url: '/shangpin/shangpin/list',
    method: 'get',
    params: query
  })
}
// 查询商品审核状态列表
export function listSpshenhe(query) {
  return request({
    url: '/system/spshenhe/list',
    method: 'get',
    params: query
  })
}

// 查询店铺列表
export function listDianpu(query) {
  return request({
    url: '/system/dianpu/list',
    method: 'get',
    params: query
  })
}

// 查询商品列表详细
export function getShangpin(spId) {
  return request({
    url: '/shangpin/shangpin/' + spId,
    method: 'get'
  })
}

// 新增商品列表
export function addShangpin(data) {
  return request({
    url: '/shangpin/shangpin',
    method: 'post',
    data: data
  })
}

// 修改商品列表
export function updateShangpin(data) {
  return request({
    url: '/shangpin/shangpin',
    method: 'put',
    data: data
  })
}

// 删除商品列表
export function delShangpin(spId) {
  return request({
    url: '/shangpin/shangpin/' + spId,
    method: 'delete'
  })
}


